'''
Created on 2010-10-17

@author: DouglasWin7
'''
from google.appengine.ext import db

class comment(db.Model):
    name = db.StringProperty()
    title = db.StringProperty()
    description = db.StringProperty()
    @staticmethod   
    def add_comment(name,title,description):
        com = comment(name=name,title=title,description=description)
        return com.put()
    
    @staticmethod 
    def get_comments():
        query = db.GqlQuery("SELECT * FROM comment")
        return query.fetch(100)
    
    @staticmethod
    def clear():
        db.delete(comment.get_comments())